package com.situ.mymall.mapper;

import com.situ.mymall.pojo.entity.Category;
import com.situ.mymall.pojo.query.CategoryQuery;
import com.situ.mymall.pojo.vo.CategoryCountVO;
import com.situ.mymall.pojo.vo.CategoryVO;

import java.util.List;

public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<CategoryVO> listAll();

    //后端首页查询
    List<Category> list(CategoryQuery categoryQuery);

    //后端批量删除
    void deleteAll(Integer[] ids);

    //后端查询一级分类
    List<Category> selectTopCategory();

    //后端查询二级分类
    List<Category> selectSecondCategoryByTopCategoryId(Integer id);

    void updateStatus(Category category);


    List<CategoryCountVO> echarts();
}